import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'

const PlatformIdKey = 'Admin-PlatformId'

export function getToken() {
  return Cookies.get(TokenKey)
}


export function setToken(token) {
  sessionStorage.setItem(TokenKey, token)
  localStorage.setItem(TokenKey, token)
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  //sessionStorage.removeItem(TokenKey) 
  return Cookies.remove(TokenKey)
}

export function getPlatformId() {
  return Cookies.get(PlatformIdKey)
}


export function setPlatformId(platformIdKey) {
  return Cookies.set(PlatformIdKey, platformIdKey)
}

export function removePlatformId() {
  return Cookies.remove(PlatformIdKey)
}
